package com.xiaoyu.shenyou.shenyouv1.mapper;

import com.xiaoyu.shenyou.shenyouv1.entity.PredNameEntity;
import com.xiaoyu.shenyou.shenyouv1.entity.PredictionEntity;
import com.xiaoyu.shenyou.shenyouv1.entity.RelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PredictionMapper {
    public List<PredNameEntity> queryPredNames();

    public PredictionEntity selectLastMethods(String predName);

    public void updateLastMethod(PredictionEntity prediction);

    public void insertPrediction(PredictionEntity newPredict);

    public List<PredictionEntity> queryPredsByPredName(String predName, int size);

    public void UpdatePredicName(@Param("predName") String predName, @Param("successPercent") double successPercent);

    public List<RelationEntity> queryRelations(@Param("userId") int userId);

    public List<PredNameEntity> queryPredNamesByList(List<Integer> collect);
}
